/*
 * @Date: 2023-02-14 09:56:14
 * @LastEditTime: 2023-02-15 09:49:58
 */
import { message } from 'ant-design-vue';

import { baseURL } from '@/request/request';

export function downLoadFile(url) {
  if (!url) {
    message.error('无下载链接');
    return;
  }
  const a = document.createElement('a');
  a.href = `${baseURL}/api/other/downLoadFile?file_url=${url}`;
  document.body.appendChild(a);
  a.click();
  return;
}
